<?php
namespace Portal\Controller;
use Common\Controller\HomebaseController; 
/**
 * 首页
 */
class IndexController extends HomebaseController {
	
	public function index() {
    	$this->display(":index");
    }
	
	//留言添加   2017年2月24日17:38:28   lzm
	public function add(){
		$name	=	I('name');
		$phone	=	I('phone');
		$info	=	I('info');
		$data	=	array(
						'full_name'	=>	$name,
						'phone'		=>	$phone,
						'msg'		=>	$info,
						'createtime'=>	date('Y-m-d H:i:s',time()),
					);
					//P($data);
					//var_dump($data);die;
		$res	=	M('guestbook')->data($data)->add();
		if(false!==$res){
			$this->ajaxReturn(array('s'=>true));
		}else{
			$this->ajaxReturn(array('s'=>false));
		}
	}
	

}


